<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <input type="text" value="" id="keyword">
        <div id="keyDiv"></div>
    </div>
    <script>
        const oInput = document.getElementById('keyword');
        const oDiv = document.getElementById('keyDiv');
        const o ={
            keyword:'LOL'
        }
        window.onload = function(){
            
            oInput.value = o.keyword
            oDiv.innerText = o.keyword
            oInput.addEventListener('input',function(){
                  targetWithLog.keyword = this.value
            })
        }
            const handler ={
            get: function(target,key){
                console.log(target,key,'546---');
                return target[key];
        },
            set:function(target,key,provalue){
                oDiv.innerText = provalue
                target[key] = provalue;
                
        }
    }

        var targetWithLog = new Proxy(o, handler);
        targetWithLog.keyword = 'fhj';
        console.log(targetWithLog.keyword);
        
    </script>
</body>
</html>